export const swiperData = [
  {
    id: 1,
    image: 'https://picsum.photos/800/400?random=1',
    title: '轮播图标题1',
    desc: '这是第一个轮播图的描述内容'
  },
  {
    id: 2,
    image: 'https://picsum.photos/800/400?random=2',
    title: '轮播图标题2',
    desc: '这是第二个轮播图的描述内容'
  },
  {
    id: 3,
    image: 'https://picsum.photos/800/400?random=3',
    title: '轮播图标题3'
  },
  {
    id: 4,
    image: 'https://picsum.photos/800/400?random=4'
  }
]

interface Product {
  id: string;
  name: string;
  price: number;
  type: string;
  package: string;
  images: string[];
}

// 商品类型和包装选项
const productTypes = ['电子产品', '家居用品', '服装', '食品', '图书', '美妆', '运动器材'];
const packages = ['标准包装', '精美礼盒', '环保包装', '豪华套装'];

// 生成随机商品数据
const generateProducts = (count: number): Product[] => {
  const products: Product[] = [];
  for (let i = 1; i <= count; i++) {
    const type = productTypes[Math.floor(Math.random() * productTypes.length)];
    const pkg = packages[Math.floor(Math.random() * packages.length)];
    const price = Math.floor(Math.random() * 10000) + 100;
    
    products.push({
      id: `p${i}`,
      name: `${type}商品${i}`,
      price,
      type,
      package: pkg,
      images: Array(5).fill(0).map((_, idx) => 
        `https://picsum.photos/300/300?random=${i}${idx}`
      )
    });
  }
  return products;
};

export const productData = generateProducts(200);
